<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class THisdataThree extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('t_hisdata_three', function (Blueprint $table) {
             $table->engine = 'MyISAM';
             $table->charset = 'utf8';
             $table->collation = 'utf8_general_ci';
            // CONTENT
            $table->increments('hd_index')->nullable(false)->comment('');
			$table->datetime('rd_updatetime')->nullable(false)->comment('');
			$table->datetime('hd_datetime')->nullable(false)->comment('');
			$table->unsignedInteger('pdi_index')->nullable(false)->default(0)->comment('');
			$table->string('hd_upsmanuinfo', 25)->nullable()->default('')->comment('');
			$table->string('hd_upsmactype', 25)->nullable()->default('')->comment('');
			$table->string('hd_upsver', 25)->nullable()->default('')->comment('');
			$table->string('hd_upsvolr', 25)->nullable()->default('')->comment('');
			$table->string('hd_upscurr', 25)->nullable()->default('')->comment('');
			$table->string('hd_upsbatvolr', 25)->nullable()->default('')->comment('');
			$table->string('hd_upsfreqr', 25)->nullable()->default('')->comment('');
			$table->float('hd_UPSShutType', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_ShutType', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_BatEnvi', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_BatStatus', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_BatChargeStatus', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_BatLastTime', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_BatDisTime', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_GageCharge', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_BatVol', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_BatCur', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_BatTemp', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_InBadNum', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_InNum', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_InFreq1', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_InVol1', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_InCur1', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_InPower1', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_InFreq2', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_InVol2', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_InCur2', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_InPower2', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_InFreq3', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_InVol3', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_InCur3', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_InPower3', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_OutHead', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_OutFreq', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_OutNum', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_OutVol1', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_OutCur1', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_OutPower1', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_OutLoad1', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_OutVol2', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_OutCur2', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_OutPower2', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_OutLoad2', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_OutVol3', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_OutCur3', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_OutPower3', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_OutLoad3', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_PassFreq', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_PassNum', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_PassVol1', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_PassCur1', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_PassPower1', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_PassVol2', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_PassCur2', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_PassPower2', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_PassVol3', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_PassCur3', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_PassPower3', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_UPSTestResult', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_OutAllLoad', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_BatCapacity', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_MachTemp', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_FaultID', 9, 2)->nullable()->default(0)->comment('');
			$table->boolean('hd_TempOverWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_InFailWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_OutFailWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_OverLoadWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_PassFailWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_OutCloseWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_UPSShutWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_ChargeFailWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SystemShutWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_FanFailWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_FusiWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_GenericFailWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_AwaitingPowerWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_ShutLastWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_ShutNowWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_DevDisWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_BatFalutWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_BatVolLowWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_BypassWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_OtherFaultWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_TestWarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_NetCom')->nullable()->default(0)->comment('');
			$table->unique('hd_index', 'hd_index');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('t_hisdata_three');
    }
}
